#!/usr/bin/env bash

echo "#===================================================="
echo "# Scenario 6a [compose_N_N]: Docker Compose many nodes"
echo "#===================================================="

# set -e: exit asap if a command exits with a non-zero status
# set -x: print each command right before it is executed
set -xe

export VNC_FROM_PORT="43900" VNC_TO_PORT="43950"

export NUM_NODES=2 PARAL_TESTS=2 WAIT_ALL_DONE="390s" SLEEP_TIME=10 PAUSE_SECS_BETWEEN_RUN_TEST="0"

export COMPOSE_FILE="docker-compose-host.yml" \
       DO_COMPOSE_UP="false"
./test/compose-test.sh

set +x
echo "#==================================================================="
echo "# Scenario 6b [compose_N_N]: Docker Compose many nodes and no video"
echo "#==================================================================="
set -x

export VIDEO="false"
export AUDIO="false"
export NUM_NODES=2 PARAL_TESTS=2 WAIT_ALL_DONE="390s" SLEEP_TIME=10 PAUSE_SECS_BETWEEN_RUN_TEST="0"

export VNC_FROM_PORT="26950" VNC_TO_PORT="26999"
export COMPOSE_FILE="docker-compose-tests.yml" \
       DO_COMPOSE_UP="true"
./test/compose-test.sh
